package com.yoda.mall.admin.controller;

import com.yoda.mall.admin.service.PreferenceAreaService;
import com.yoda.mall.model.entity.cms.PreferenceArea;
import com.yoda.mall.model.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shawn
 * @date 2022年 12月 18日 19:38
 */
@RestController
@RequestMapping("/prefrenceArea")
public class PreferenceAreaController {

    @Resource
    private PreferenceAreaService preferenceAreaService;

    /**
     * 得到所有偏好
     *
     * @return {@link R}
     */
    @GetMapping("/listAll")
    public R getAllPreference(){
        List<PreferenceArea> list = preferenceAreaService.getAllPreference();
        return R.success(list);
    }
///listAll
}
